<template>
  <div class="detail-container">
    <div class="container">
      <div class="aside">
        <!-- 个人肖像 -->
        <section class="me">
          <section class="portrait">
            <!-- 头像照片 -->
            <img class="avatar" :src="insFormData.insPicture"/>
          </section>

          <h2 class="name">{{insFormData.insName}}</h2>
          <h4 class="info-job">{{insFormData.insProfessor}}/{{insFormData.insCommander}}</h4>

        </section>

        <!-- 基本信息 -->
        <section class="profile info-unit">
          <h2>
            <i class="el-icon-user-solid" aria-hidden="true"></i>基本信息</h2>
          <hr/>
          <ul>
            <li>
              <label>性别</label>
              <span v-if="insFormData.insGender==0">女</span>
              <span v-if="insFormData.insGender==1">男</span>
            </li>
            <li>
              <label>出生日期</label>
              <span>{{insFormData.insBirth}}</span>
            </li>
            <li>
              <label>籍贯</label>
              <span>{{insFormData.insNativePlace}}</span>
            </li>
            <li>
              <label>政治面貌</label>
              <span>{{insFormData.insPoliticalOutlook}}</span>
            </li>
            <li>
              <label>学历</label>
              <span>{{insFormData.insEducation}}</span>
            </li>
            <li>
              <label>学位</label>
              <span>{{insFormData.insAcademicDegree}}</span>
            </li>

            <li>
              <label>专业名称</label>
              <span>{{insFormData.insMajor}}</span>
            </li>
          </ul>
        </section>

        <!-- 联系方式 -->
        <section class="contact info-unit">
          <h2>
            <i class="el-icon-phone" aria-hidden="true"></i>联系方式</h2>
          <hr/>
          <ul>
            <li>
              <label>手机号</label>
              <span>{{insFormData.insMobile}}</span>
            </li>
            <li>
              <label>邮箱</label>
              <span>{{insFormData.insEmail}}</span>
            </li>
            <li>
              <label>办公电话</label>
              <span>{{insFormData.insPhone}}</span>
            </li>
          </ul>
        </section>

        <!-- 研究方向 -->
        <!--<section class="skill info-unit">
          <h2>
            <i class="el-icon-position"></i></h2>
          <hr/>
          <div v-html="insFormData.insDirection">

          </div>
        </section>-->

        <section class="skill info-unit">
          <h2><i class="el-icon-s-promotion" aria-hidden="true"></i>指导方向</h2>
          <hr/>
          <div v-html="insFormData.insDirection"></div>
        </section>

        <section class="skill info-unit">
          <h2><i class="el-icon-data-analysis" aria-hidden="true"></i>讲授课程</h2>
          <hr/>
          <b>本科</b>
          <div v-html="insFormData.insTeachingUndergraduate"></div>
          <b>研究生</b>
          <div v-html="insFormData.insTeachingGraduate"></div>
        </section>



<!--        <section class="skill info-unit">-->
<!--          <h2><i class="el-icon-notebook-2" aria-hidden="true"></i>出版教材</h2>-->
<!--          <hr/>-->
<!--          <div v-html="insFormData.insPublishTextbook"></div>-->
<!--        </section>-->

        <section class="skill info-unit">
          <h2><i class="el-icon-trophy" aria-hidden="true"></i>获奖情况</h2>
          <hr/>
          <div v-html="insFormData.insReward"></div>
        </section>

        <section class="skill info-unit">
          <h2><i class="el-icon-medal" aria-hidden="true"></i>荣誉称号</h2>
          <hr/>
          <div v-html="insFormData.insHonor"></div>
        </section>

        <section class="skill info-unit">
          <h2><i class="el-icon-more" aria-hidden="true"></i>其他信息</h2>
          <hr/>
          <div v-html="insFormData.insOther"></div>
        </section>

      </div>

      <div class="main">

        <!-- 教育工作经历 -->
        <section class="edu info-unit">
          <h2>
            <i class="el-icon-collection" aria-hidden="true"></i>教育工作经历</h2>
          <hr/>
          <div v-html="insFormData.insExperience">

          </div>
        </section>

        <!-- 研究生情况 -->
        <section class="edu info-unit">
          <h2>
            <i class="el-icon-user-solid" aria-hidden="true"></i>指导研究生取得的成果</h2>
          <hr/>
            <div v-html="insFormData.insTrainingGraduate"></div>
         <!-- <div>
            <h4>毕业研究生情况:</h4>
            <div v-html="insFormData.insTrainingGraduated"></div>
          </div>-->
        </section>

        <section class="edu info-unit">
          <h2>
            <i class="el-icon-office-building" aria-hidden="true"></i>社会兼职</h2>
          <hr/>
          <div v-html="insFormData.insSocialAppointment">

          </div>
        </section>


        <div style="font-weight: 900;font-size: 24px;margin-top: 40px;"><i class="el-icon-s-opportunity" aria-hidden="true"></i>研究成果
          <hr>
        </div>

        <section style="padding-left: 20px;" class="work info-unit">
          <h2>出版专著/教材</h2>
          <hr/>
<!--          <div v-html="insFormData.insAcademicWorks"></div>-->
          <div v-html="insFormData.insPublishTextbook"></div>
        </section>

        <!-- 科研论文 -->
        <section style="padding-left: 20px;" class="work info-unit">
          <h2>发表论文</h2>
          <hr/>
          <div style="padding: 10px;font-size: 14px;" class="info-content" v-html="insFormData.insPapers"></div>
        </section>

        <!-- 科研项目 -->
        <section style="padding-left: 20px;" class="project info-unit">
          <h2>研究项目</h2>
          <hr/>
          <div style="padding: 10px;font-size: 14px;" class="info-content" v-html="insFormData.insProjects"></div>
        </section>

        <section style="margin-bottom: 300px;">

        </section>


      </div>

    </div>


  </div>
</template>

<script>
  export default {
    props: {
      insFormData: {
        type: Object
      }
    },
    // watch: {
    //   insFormData(val){
    //     console.log(val)
    //     val.insDirection = val.insDirection.replace(";","<br/>")
    //     this.insFormData = val
    //   }
    //   },
    data(){
      return {
        // insFormData: {}
      }
    }
  }
</script>

<style scoped>
  .detail-container {
    /*background: #e5e5e5 url(../../assets/images/background.png);*/
    width: 100%;
    height: 90%;
    overflow-x: hidden;
    padding: 2rem 5%;
    padding-bottom: 2%;
    box-sizing: border-box;
    font-size: .9em;
  }

  .detail-container .fa {
    margin-right: .3em;
  }

  .detail-container .info-unit {
    font-size: 1em;
    margin-bottom: 1rem;
  }

  .detail-container .info-unit h2 {
    font-size: 20px;
    font-weight: 700;
  }

  .detail-container .info-unit h3 {
    font-weight: 300;
  }


  /* -------------------------------------------------
   * 主体部分
   * ------------------------------------------------- */


  .container .aside {
    position: absolute;
    width: 20rem;
    height: 1400px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px #bbb;
    box-sizing: border-box;
    overflow: auto;
    padding: 1rem;
  }

  .aside::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 1px;
  }

  .aside::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: #ccc;
  }

  .aside::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background: #ededed;
  }

  .container .aside .me {
    text-align: center;
    margin-bottom: 2rem;
  }

  .container .aside .me .portrait {
    margin: 0 auto;
    margin-bottom: 1rem;
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    position: relative;
  }

  .container .aside .me .portrait img {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
  }

  .container .aside .info-unit ul li label {
    display: inline-block;
    width: 35%;
  }

  .container .aside .info-unit ul li {
    margin: 10px 0;
  }

  .container .aside .info-unit ul li span {
    display: inline-block;
    vertical-align: top;
    width: 60%;
  }

  .container .main {
    position: relative;
    margin-left: 22rem;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px #bbb;
    box-sizing: border-box;
    padding: 1rem;
  }

  .container .main .info-unit ul {
    box-sizing: border-box;
    padding-left: 1.2rem;
    padding-right: 0.8rem;
  }

  .container .main .info-unit ul li {
    margin-bottom: 1rem;
    list-style: disc;
  }

  .container .main .info-unit ul li h3 .link {
    font-size: .5rem;
    border: 1px solid #4db6ac;
    padding: 1px 3px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    margin-left: .5rem;
  }

  .container .main .info-unit ul li h3 time {
    text-align: right;
    float: right;
  }

  .container .main .info-unit ul li .info-content li {
    list-style: circle;
    margin: 0;
  }

  .container .main .info-unit ul li .info-content .fa {
    font-size: 1em;
  }


  /* -------------------------------------------------
   * 自定义部分
   * ------------------------------------------------- */
  .fa {
    font-size: 1.2em;
  }

  h2 {
    font-size: 1.2em;
  }

  h3 {
    font-size: 1.1em;
  }

  hr {
    margin-bottom: .4em;
  }

  aside {
    position: fixed;
    right: 0;
    top: 30%;
    z-index: 2;
  }

  aside ul li {
    margin-bottom: 10px;
    -webkit-border-radius: 10px 0 0 10px;
    border-radius: 19px 0 0 10px;
    -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    background: #1abc9c;
  }

  aside ul li a {
    display: inline-block;
    width: 80px;
    height: 38px;
    line-height: 38px;
    padding-left: 10px;
    color: #fff;
  }

  mark {
    background: rgba(232, 232, 232, 0.8);
  }

  @media screen and (max-width: 1169px) {
    .container .info-unit h3 span {
      display: block;
    }

    .container .info-unit h3 span.link {
      display: inline;
    }

    .container .project h3 span {
      display: inline;
    }

    .container .project h3 time {
      display: block;
    }

    .container .main .info-unit ul li h3 time {
      float: none;
      text-align: left;
    }
  }

  @media screen and (max-width: 1034px) {
    body {
      padding: 1rem 3%;
    }
  }

  @media screen and (max-width: 750px) {
    .container .aside {
      position: static;
      width: 95%;
      margin: 0 auto;
    }

    .container .main {
      position: static;
      margin-left: 0;
      width: 95%;
      margin: 0 auto;
      margin-top: 1.5rem;
    }

    #nav-m {
      display: none;
      position: fixed;
      width: 28px;
      height: 28px;
      right: 10px;
      bottom: 20px;
      box-shadow: 0 5px 20px #bbb;
      border-radius: 50%;
    }

    #nav-m svg {
      width: 28px;
      height: 28px;
    }

    aside {
      display: none;
    }
  }


</style>
